As an autofocus (AF) system for a camera module, there is known a contrast AF system, for example. Referring to the contrast AF system, an image pickup lens is driven in such a manner that a contrast is maximized in a target region to be brought into focus in images taken in by means of an image sensor. The conventional contrast AF system takes measures for excluding a contrast component on a low level to evaluate a contrast in order to efficiently take out a contour part to be a contrast component on a high level, for example, when detecting the contrast from an image signal through image pickup. In some cases in which a pattern to be the contrast component on the low level is more predominant as compared with the contour part which can be a feature of the image, the contrast component on the low level is excluded so that an accurate focus operation is hard to perform. If the contrast component on the low level is caused to remain, moreover, there is reduced a detection sensitivity of a focusing point in which the contrast is maximized.